namespace IAM.Interface.DAL.Request
{
    using IAM.Interface.Common.Context;
    using IAM.Interface.DAL.Request.Interface;
    using IAM.Interface.IDAL;
    using IAM.Interface.Model;
    using IAM.Interface.Model.ENUM;
    using System;

    public class DelegationMgnt : AbsTransmissionParameter, IDelegationMgnt
    {
        public AIDelegations GetDelegationInfo(AccountInfo accountinfo)
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.DM_GETDELEINFO, OperationType.Nullity, accountinfo, accountinfo.GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (AIDelegations) rcc.Incept(strreturn);
        }

        public Modules GetModuleList()
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.DM_GETMODULELIST, OperationType.Nullity, new NullityObj(), new NullityObj().GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (Modules) rcc.Incept(strreturn);
        }

        public AIDelegations SetDelegationInfo(AIDelegations aidelegations)
        {
            RequestContextModel rcm = new RequestContextModel(ActionType.DM_SETDELEINFO, OperationType.Nullity, aidelegations, aidelegations.GetType(), this.TranPar);
            RequestContextControl rcc = new RequestContextControl(rcm);
            string strreturn = rcc.Send();
            return (AIDelegations) rcc.Incept(strreturn);
        }
    }
}
